<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ page import="org.tobuy.vo.User"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>Login</title>
	<!--
	<link rel="stylesheet" type="text/css" href="styles_index.css">
	-->
  </head>
  
  <body>
  <%
  	
  	User user = (User)request.getAttribute("user");
  	List<String> info = (List<String>)request.getAttribute("info");
   	if(user == null && info != null){
   		Iterator<String> iter = info.iterator();
  		while(iter.hasNext()){
  			%><h4><%=iter.next()%></h4>
  			<%
  		}%>
  		<form action="LoginServlet" method="post">
   			 E-mail:<input type="text" name="userid">
   			 pass:<input type="password" name="userpass">
   			 <input type="submit" value="submit">
  		  	<input type="reset" value="reset">
   			 </form>
  		<%
   	}
   	if(user != null){
   		session.setAttribute("user", user);
   		 %>
            <jsp:forward page="index.jsp"/>
         <%
   	}%>
 
  </body>
</html>